package cn.yiyuan.car.entity;

import cn.yiyuan.auth.entity.EmpEntity;
import cn.yiyuan.auth.entity.ShopEntity;
import cn.yiyuan.base.entity.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author lijie
 * @since 2024-01-03
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class CarEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    private Long id;
    private String title;
    /**
     * 封面 fastdfs地址
     */
    private String cover;
    /**
     * 原价
     */
    private BigDecimal saleprice;
    /**
     * 售价
     */
    private BigDecimal costprice;
    /**
     * 是否新车 1-是 0-否
     */
    private Integer isnew;
    /**
     * 上牌时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date reigstertime;
    /**
     * 里程
     */
    private Double mileage;
    /**
     * 店铺Id 
     */
    private Long shopId;
    private String shopname;
    private ShopEntity shop;

    private Date createtime;
    /**
     * 上架时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onsaletime;
    /**
     * 下架时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date offsaletime;
    /**
     * 状态：0下架 1上架
     */
    private Integer state;
    /**
     * 是否超值 1-是 0-否
     */
    private Integer costeffective;
    /**
     * 急售 1-是 0-否
     */
    private Integer rushsale;
    /**
     * 准新车 1-是 0-否
     */
    private Integer quasinewcar;
    /**
     * 是否可迁全国  1-是 0-否
     */
    private Integer transitivecountry;
    /**
     * 类型id
     */
    private Long typeId;
    private CarTypeEntity carType;
    /**
     * 销售顾问-员工表的ID
     */
    private Long sellerId;
    private EmpEntity seller;
    /**
     * 二手车发布消息的ID
     */
    private Long searchMasterMsgId;
    /**
     * 审核状态1=审核通过 0-审核驳回
     */
    private Integer auditstate;

    // 车辆详情
    private CarDetailEntity carDetailEntity;

}
